import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      //打开页面时重定向到首页
      path: "/",
      redirect: "/home",
    },
    {
      path: '/index',
      name: 'index',
      component: () => import('@/page/index.vue'),
      children: [
        {//学生端首页
          name: "home",
          path: "/home",
          component: () => import("@/page/home.vue"),
        },
        {//学生端个人信息
          path: '/userInformation',
          name: 'userInformation',
          component: () => import('@/page/userInformation/index.vue')
        },
        {//学生端职位信息
          path: '/position',
          name: 'position',
          component: () => import('@/page/position/index.vue')
        },
        {//学生端职位信息--详细页面
          path: '/position/jobDetails',
          name: 'jobDetails',
          component: () => import('@/page/position/components/jobDetails.vue')
        },
        {//学生端职位信息--查看全部岗位
          path: '/position/allPosition',
          name: 'allPosition',
          component: () => import('@/page/position/components/allPosition.vue')
        },
        {//学生端ai模块
          path: '/aiSimulatedInterview',
          name: 'aiSimulatedInterview',
          component: () => import('@/page/aiSimulatedInterview/index.vue')
        },
        {//学生端就业指导模块
          path: '/Guidance',
          name: 'Guidance',
          component: () => import('@/page/employmentGuidance/index.vue')
        },
        {//学生端就业指导模块
          path: '/Guidance/guidanceDetail',
          name: 'guidanceDetail',
          component: () => import('@/page/employmentGuidance/guidanceDetail/index.vue')
        },
        {//学生端学院可视化
          path: '/Visualization/college',
          name: 'college',
          component: () => import('@/page/Visualization/college.vue')
        },
        {//学生端学院可视化
          path: '/Visualization/province',
          name: 'province',
          component: () => import('@/page/Visualization/province.vue')
        },
        {//学生端就业指导模块
          path: '/test',
          name: 'test',
          component: () => import('@/components/test.vue')
        },
        // {//学生端就业指导模块---详细页面
        //   path: '/employmentGuidance/guidanceDetail',
        //   name: 'guidanceDetail',
        //   component: () => import('@/page/employmentGuidance/guidanceDetail/index.vue')
        // },

      ]
    },
    {
      path: '/employPage',
      name: 'employPage',
      component: () => import('@/employPage/index.vue'),
      children: [
        {//企业端首页
          name: "employHome",
          path: "/employHome",
          component: () => import("@/employPage/home.vue"),
        },
        {
          //企业端可视化
          name: "employVisualization",
          path: "/employVisualization",
          component: () => import("@/employPage/employVisualization/index.vue")
        },
        {//企业端职位信息
          name: "jobRecommendation",
          path: "/jobRecommendation",
          component: () => import("@/employPage/jobRecommendation/index.vue"),
        },
        {//企业端职位详细信息
          name: "employjobDetails",
          path: "/jobRecommendation//jobDetails",
          component: () => import("@/employPage/jobRecommendation/components/jobDetails.vue"),
        },
        {//企业端发布 职位信息
          name: "pushPosition",
          path: "/jobRecommendation/pushPosition",
          component: () => import("@/employPage/jobRecommendation/components/pushPosition/index.vue"),
        },
        {//企业端就业政策详细
          name: "employmentGuidanceDetail",
          path: "/employmentPolicy/guidanceDetail",
          component: () => import("@/employPage/employmentPolicy/guidanceDetail/index.vue"),
        },
        {//企业端就业政策
          name: "employmentPolicy",
          path: "/employmentPolicy",
          component: () => import("@/employPage/employmentPolicy/index.vue"),
        },
        {//企业端 个人中心
          name: "enterInformation",
          path: "/employUserInformation",
          component: () => import("@/employPage/userInformation/index.vue"),
        },
        {//企业端 学生简历
          name: "interviewQuestion",
          path: "/interviewQuestion",
          component: () => import("@/employPage/interviewQuestion/index.vue"),
        },
      ]
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('../views/register.vue')
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/login.vue')
    },
    {
      path: '/forgetPassword',
      name: 'forgetPassword',
      component: () => import('../views/forgetPassword.vue')
    },
  ]
})

export default router
